<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

<script>
    // 1、创建数组

    // 实例化数组创建数组
    let arr=new Array('a','b','c');

    //使用字面量创建数组
    let arr2=[80,90,132,133];
    console.log(arr2);


    // 2、访问数组元素
    console.log(arr2[2])
    //数组长度
    console.log(arr2.length);
    // 3、遍历数组
    let sum=0;
    for(let i=0;i<arr2.length;i++){
        sum+=arr2[i];
    }
    console.log(sum);
</script>